package com.thrift.distributed.constant;

import lombok.Getter;

/**
 * Created by 张波 on 2019/9/18.
 */
public class DistributedEnum {

    /**
     * 接口重置频率
     */
    @Getter
    public enum RESETRULE_ENUM {
        DAY("0", "天"), WEEK("1", "周"), MONTH("2", "月"), YEAR("4", "年"), TOTAL("5", "总次数"), UNLIMITED("6", "无限制");

        private String code;

        private String value;

        RESETRULE_ENUM(String code, String value) {
            this.code = code;
            this.value = value;
        }

    }

    /**
     * 免计费查询频率
     */
    @Getter
    public enum FREECYCLE_ENUM {

        MINUS("0", "分"), HOUSE("1", "时"), DAY("2", "天"), WEEK("3", "周"), MONTH("4", "月"), YEAR("6", "年");

        private String code;

        private String value;

        FREECYCLE_ENUM(String code, String value) {
            this.code = code;
            this.value = value;
        }
    }

    /**
     * 访问返回结果枚举类型
     */
    @Getter
    public enum AUTH_RESULT_ENUM {
        ACCESS_DENIED("0", "拒绝访问"),
        AUTHORIZED_EXPIRATION("1", "授权到期或未生效"),
        INSUFFICIENT_FREQUENCY("2", "使用次数不足"),
        ACCESS_ALLOW("3", "允许访问，减少次数"),
        ACCESS_FRE_ALLOW("4", "允许访问，不减次数");

        private String code;

        private String value;

        AUTH_RESULT_ENUM(String code, String value) {
            this.code = code;
            this.value = value;
        }
    }

    @Getter
    public enum DATA_STATUS_ENUM {

        VALID("0","有效"),INVALID("1","无效");

        private String code;

        private String value;

        DATA_STATUS_ENUM(String code, String value) {
            this.code = code;
            this.value = value;
        }
    }
}
